package com.exam.controller;

import com.exam.dto.ActionResult;
import com.exam.po.Score;
import com.exam.service.ScoreSectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zhanghui
 * @ClassName ScoreSectionController
 * @Description 分数分段
 * @Date 2021/1/12 15:18
 * @Version 1.0
 **/
@RequestMapping("/api")
@RestController
public class ScoreSectionController {
    //分段查询
    @Autowired
    private ScoreSectionService scoreSectionService;
    @GetMapping("/scoreSection/scores/{examcode}")
    public ActionResult ScoreSectionController(@PathVariable Integer examcode){
        List<Score> score = scoreSectionService.findByExamCode(examcode);
        return new ActionResult(200,"查找成功",score);
    }
}
